package com.yougou.utils;

import android.content.Context;
import android.widget.Toast;

public class ToastUtils {
    
    private static Toast sToast;
    
    public static void show(Context context, String message) {
        if (sToast == null) {
            sToast = Toast.makeText(context, message, Toast.LENGTH_SHORT);
        } else {
            sToast.setText(message);
        }
        sToast.show();
    }
    
    public static void showLong(Context context, String message) {
        if (sToast == null) {
            sToast = Toast.makeText(context, message, Toast.LENGTH_LONG);
        } else {
            sToast.setText(message);
            sToast.setDuration(Toast.LENGTH_LONG);
        }
        sToast.show();
    }
}

